<%@ page language="java" pageEncoding="utf-8"
		 contentType="text/html;charset=utf-8"%>
<html>

<%@ include file="../../../common/jstl.jsp"%>
<head>
</head>

<body>

<div>
	<div class="J_formTable l_form_table mgt40">
			<form action="${ctx}/upload/ajax/upload_excel" id="editForm" method="post">
				<div>
					<div class="J_formTable l_form_table">
						<table class="edui-for-lineheight">
							<tr>
								<td class="l_title w200">奖项类型：<font color="red">*</font></td>
								<td>
									<div class="t_opacitySelect fl">
										<div class="t_opacitySelect ml10">
											<select id="columnId" name="columnId"  style="min-width:200px">
												<option value="">请选择</option>
												<c:forEach items="${awardRecordCateList }" var="c">
													<option value="${c.id }">${c.name }</option>
												</c:forEach>
											</select>
										</div>
									</div>
								</td>
							</tr>
							<tr>
								<td class="l_title w200">获奖时间：<font color="red">*</font></td>
								<td>
									<div class="J_toolsBar fl">
										<div class="w200 ml10">
											<label>
												<input placeholder="开课时间" type="text" id="awardTime" name="awardTime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" value="${awardRecord.awardTime }" style="min-width:200px" autocomplete="off">
											</label>
										</div>
									</div>
								</td>
							</tr>

							<tr>
								<td class="l_title w200">excel 模板上传：<font color="red">*</font> </td>
								<td>
									<div class="J_toolsBar fl">
										<div class="w200 ml10">
											<label>
												<input type="file" style="min-width:200px" name="file">
											</label>
										</div>
									</div>
								</td>
							</tr>
						</table>
					</div>
				</div>
			</form>
	</div>
</div>
<script type="text/javascript">

	//表单验证
	$(function(){
		$('#editForm').validator({
			ignore: ':hidden',
			fields : {
				columnId : '奖项分类:required;',
				awardTime : '获奖时间:required;',
				file : '文件:required;',
			},
			valid : function(form){
				var laodIdx = layer.load();

				$('#editForm').ajaxSubmit({
					data : {
					},
					traditional : true,
					success : function(result){
						layer.close(laodIdx);
						if(result.success){
							layer.alert('保存成功', function(){
								window.location.reload();
							});
						}else{
							layer.alert(result.msg);
						}
					}
				});
			}
		});
	});
</script>
</body>
</html>